<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="用料记录" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
</head>
<body oncontextmenu="return false" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
  <div class="sheet-top">
    <div class="content">
      <h2>用料记录</h2>
      <p>${mark}</p>
    </div>
  </div>
  <div class="sheet-list">
	<div class="search-business">
		<div class="table-list">
			<table width="100%">
				<tbody>
				<tr>
					<th width="15%">单号</th>
					<th width="9%">日期</th>
					<th width="15%">供/需方</th>
					<th width="6%">出/入</th>
					<th width="14%">材料编号</th>
					<th width="20%">品名规格</th>
					<c:if test="${showCost=='1'}">
						<th width="7%">单位</th>
						<th width="7%">数量</th>
						<th width="7%">金额</th>
					</c:if>
					<c:if test="${showCost!='1'}">
						<th width="10%">单位</th>
						<th width="11%">数量</th>
					</c:if>
				</tr>
				<c:forEach var="item" items="${list}">
				<tr>
					<td>${item.billCode}</td>
					<td><fmt:formatDate value="${item.billDate}" pattern="yyyy-MM-dd"/></td>
					<td>${item.otherName}</td>
					<td>
						<c:if test="${item.billType=='IN'}">入</c:if>
			    		<c:if test="${item.billType=='OUT'}">出</c:if>
					</td>
					<td>${item.productCode}</td>
					<td>${item.productName}</td>
					<td>${item.productUnit}</td>
					<td>
						<c:if test="${item.billType=='IN'}"><commonTag:parseBigDecimal source="${item.inAmount}" /></c:if>
			    		<c:if test="${item.billType=='OUT'}"><commonTag:parseBigDecimal source="${item.outAmount}" /></c:if>
					</td>
					<c:if test="${showCost=='1'}">
						<td>
							<c:if test="${item.billType=='IN'}">${0-item.inCost}</c:if>
							<c:if test="${item.billType=='OUT'}">${item.outCost}</c:if>
						</td>
					</c:if>
				</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
  </div>
<div class="blank12"></div>	
</div>
</body>
</html>
